#include "BarberThread.h"

BarberThread::BarberThread(BarberShop *bShop, unsigned int pThreadID)
:
Runnable(),
m_pkBarberShop(bShop),
m_uiThreadID(pThreadID)
{
}

BarberThread::~BarberThread(void)
{
}

void BarberThread::run()
{
	bool exit = false;
	int barberTimeCounter = 0;
	int barberTimeInterval;
	while(!exit)
	{
		barberTimeCounter++;

		if (barberTimeCounter >= barberTimeInterval)
		{
			m_pkBarberShop->ExecuteQueryAndLock(IS_ANY_CLIENT_WAITING);
			barberTimeCounter = 0;
			//barberTimeInterval -> nuevo random
		}
	}
	//pregunta si la silla del peluquero esta libre
	
}
